from flask import Flask,request
from flask_cors import CORS
import json
import  comment
app = Flask(__name__)
CORS(app)
@app.route('/postAri',methods=['GET','POST'])
def shenhe():
    if request.method == "POST":
        res=request.get_json()
        comment.insertBoke(res['title'],res['article'])
    return '456'
@app.route('/postCom',methods=['GET','POST'])
def hello_world():
    if request.method == "POST":
        res=request.get_json()
        comment.insertComment(res['idcomment'],res['comment'])
    return '456'

if __name__ == '__main__':
   app.run()